package com.peking.donations.plugins.pay.wx.protocol.query;

import com.peking.donations.plugins.pay.wx.constants.ErrorCode;

import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;
import java.util.Date;

/**
 * PayQueryRepData
 * <p>
 * <p>
 * </p>
 *
 * @author Vigor Yuan
 */
@XmlRootElement(name = "xml")
public class PayQueryRepData implements Serializable {

    private static final long serialVersionUID = -8231097761700842810L;

    /**
     * 返回状态码
     * <p>
     * <p>
     * 是 String(16) SUCCESS/FAIL 此字段是通信标识,非交易 标识,交易是否成功需要查 看 result_code 来判断
     * </p>
     */
    private String return_code;

    /**
     * 返回信息
     * <p>
     * <p>
     * 是 String(128) 返回信息,如非空,为错误 原因 签名失败 参数格式校验错误
     * </p>
     */
    private String return_msg;

    /** <b> 以下字段在 return_code 为 SUCCESS 的时候有返回 </b> */

    /**
     * 公众账号 ID
     * <p>
     * <p>
     * String(32),微信分配的公众账号
     * </p>
     */
    private String appid;

    /**
     * 商户号
     * <p>
     * <p>
     * mch_id 是 String(32) 微信支付分配的商户号
     * </p>
     */
    private String mch_id;

    /**
     * 随机字符串
     * <p>
     * <p>
     * nonce_str 是 String(32) 随机字符串,不长于 32 位
     * </p>
     */
    private String nonce_str;

    /**
     * 签名
     * <p>
     * <p>
     * sign 是 String(32) 签名
     * </p>
     */
    private String sign;

    /**
     * 业务结果
     * <p>
     * <p>
     * 是 String(16) SUCCESS/FAIL
     * </p>
     */
    private String result_code;

    /**
     * 错误代码
     * <p>
     * <p>
     * err_code 否 String(32)
     * </p>
     */
    private ErrorCode err_code;

    /**
     * 错误代码描述
     * <p>
     * <p>
     * String(128) 结果信息描述
     * </p>
     */
    private String err_code_des;

    /**
     * 设备号
     * <p>
     * <p>
     * device_info 否 String(32) 微信支付分配的终端设备号
     * </p>
     */
    private String device_info;

    private String openid;

    private String trade_type;

    private String trade_state;

    private String total_fee;

    private String trade_state_desc;

    private String transaction_id;

    private String out_trade_no;

    private String attach;

    private Date time_end;

    public String getAppid() {
        return appid;
    }

    public void setAppid(String appid) {
        this.appid = appid;
    }

    public String getAttach() {
        return attach;
    }

    public void setAttach(String attach) {
        this.attach = attach;
    }

    public String getDevice_info() {
        return device_info;
    }

    public void setDevice_info(String device_info) {
        this.device_info = device_info;
    }

    public ErrorCode getErr_code() {
        return err_code;
    }

    public void setErr_code(ErrorCode err_code) {
        this.err_code = err_code;
    }

    public String getErr_code_des() {
        return err_code_des;
    }

    public void setErr_code_des(String err_code_des) {
        this.err_code_des = err_code_des;
    }

    public String getMch_id() {
        return mch_id;
    }

    public void setMch_id(String mch_id) {
        this.mch_id = mch_id;
    }

    public String getNonce_str() {
        return nonce_str;
    }

    public void setNonce_str(String nonce_str) {
        this.nonce_str = nonce_str;
    }

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getOut_trade_no() {
        return out_trade_no;
    }

    public void setOut_trade_no(String out_trade_no) {
        this.out_trade_no = out_trade_no;
    }

    public String getResult_code() {
        return result_code;
    }

    public void setResult_code(String result_code) {
        this.result_code = result_code;
    }

    public String getReturn_code() {
        return return_code;
    }

    public void setReturn_code(String return_code) {
        this.return_code = return_code;
    }

    public String getReturn_msg() {
        return return_msg;
    }

    public void setReturn_msg(String return_msg) {
        this.return_msg = return_msg;
    }


    public String getSign() {
        return sign;
    }

    public void setSign(String sign) {
        this.sign = sign;
    }

    public Date getTime_end() {
        return time_end;
    }

    public void setTime_end(Date time_end) {
        this.time_end = time_end;
    }

    public String getTotal_fee() {
        return total_fee;
    }

    public void setTotal_fee(String total_fee) {
        this.total_fee = total_fee;
    }

    public String getTrade_state() {
        return trade_state;
    }

    public void setTrade_state(String trade_state) {
        this.trade_state = trade_state;
    }

    public String getTrade_state_desc() {
        return trade_state_desc;
    }

    public void setTrade_state_desc(String trade_state_desc) {
        this.trade_state_desc = trade_state_desc;
    }

    public String getTrade_type() {
        return trade_type;
    }

    public void setTrade_type(String trade_type) {
        this.trade_type = trade_type;
    }

    public String getTransaction_id() {
        return transaction_id;
    }

    public void setTransaction_id(String transaction_id) {
        this.transaction_id = transaction_id;
    }
}
